import java.time.Month;
import java.time.YearMonth;
import java.time.temporal.ChronoUnit;
import java.util.function.Function;
import java.util.function.Predicate;

public class Man {
    public static void main(String[] args) {
        System.out.println("m");

        int x = 5;
        x = ~x;
        x = x >> 1;

        YearMonth y1 = YearMonth.of(2015, Month.SEPTEMBER);
        YearMonth y2 = YearMonth.of(2016,Month.FEBRUARY);

        System.out.println(y2.until(y1, ChronoUnit.MONTHS));

        Double d = new Double("1.67d");
        System.out.println(d);

        Float f = new Float("23.43");
        System.out.println(f);

        Boolean b = new Boolean("false");
        System.out.println(b);

        Predicate<String> lengther = (s) -> s.length() < 2;
        Predicate<String> equalizer = Predicate.isEqual("car");
        Function<Boolean,String> booleaner = i -> Boolean.toString(i);
        Function<String,Boolean> stringer = s -> Boolean.parseBoolean(s);

        System.out.println(booleaner.apply(true));
        System.out.println(lengther.negate().or(equalizer).test("CAR"));
        System.out.println(booleaner.compose(stringer).apply("true").substring(0,3));
        System.out.println(stringer.compose(booleaner).apply(true));
//        System.out.println(booleaner.andThen(stringer).apply("true"));


    }

}
